package com.sunwayworld.basemodule.business.batch.resource;

import com.alibaba.fastjson.JSONObject;
import com.sunwayworld.basemodule.basedata.batchtype.bean.LimsBatchCategoryBean;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;
import org.springframework.web.bind.annotation.*;

import com.sunwayworld.basemodule.business.batch.bean.LimsBatchBean;
import com.sunwayworld.basemodule.business.batch.service.LimsBatchService;
import com.sunwayworld.framework.support.base.resource.GenericResource;

@RequestMapping("/secure/basemodule/business/batchs")
public interface LimsBatchResource extends GenericResource<LimsBatchService, LimsBatchBean, Long> {

    @Log(value = "批量提交", type = LogType.UPDATE)
    @RequestMapping(value = "/submit",method = RequestMethod.POST)
    void batchSubmit(RestJsonWrapperBean wrapper);

    @Log(value = "审核通过", type = LogType.UPDATE)
    @RequestMapping(value = "/approve",method = RequestMethod.POST)
    void batchApprove(RestJsonWrapperBean wrapper);

    @Log(value = "审核拒绝", type = LogType.UPDATE)
    @RequestMapping(value = "/reject",method = RequestMethod.POST)
    void batchReject(RestJsonWrapperBean wrapper);

    @Log(value = "提交", type = LogType.UPDATE)
    @RequestMapping(value = "/submitById/{id}",method = RequestMethod.POST)
    void submitById(@PathVariable Long id, RestJsonWrapperBean wrapper);

    @GetMapping(value = "/detail/page/{id}")
    LimsBatchBean selectForBatchDetailPage(@PathVariable Long id);

    @PostMapping(value = "/recall-batch")
    JSONObject recallBatch(RestJsonWrapperBean jsonWrapperBean);

    @PostMapping(value = "/batch-category")
    LimsBatchCategoryBean batchCategory(RestJsonWrapperBean wrapperBean);
}
